<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    /*var reg = /^[a-zA-Z1-9-_]{6,20}$/;
    console.log(reg.test('hjfpkm'));*/
    var reg =/^[\w\d]{6,18}@(163|qq)\.com$/
    var a = reg.test('SD223839806@qq.com')
console.log(a);
</script>
</html>